package org.dolphin.base.bean;

import java.io.Serializable;
import org.springframework.util.ObjectUtils;

public class CustomerVO implements Serializable {
  private static final long serialVersionUID = -853976270484529107L;
  private Long id;
  private Long version;
  private String alias;
  private String firstname;
  private String lastname;
  private String street;
  private String phone;
  private String mobile;
  private String fax;
  private String email;
  private RegionVO region;
  private CityVO city;
  private String postalCode;

  @Override
  public boolean equals(Object obj) {
    if (obj == this) {
      return true;
    } else if (obj instanceof CustomerVO) {
      CustomerVO oth = (CustomerVO) obj;
      return ObjectUtils.nullSafeEquals(getId(), oth.getId());
    }
    return false;
  }

  public String getAlias() {
    return alias;
  }

  public CityVO getCity() {
    return city;
  }

  public String getEmail() {
    return email;
  }

  public String getFax() {
    return fax;
  }

  public String getFirstname() {
    return firstname;
  }

  public Long getId() {
    return id;
  }

  public String getLastname() {
    return lastname;
  }

  public String getMobile() {
    return mobile;
  }

  public String getPhone() {
    return phone;
  }

  public String getPostalCode() {
    return postalCode;
  }

  public RegionVO getRegion() {
    return region;
  }

  public String getStreet() {
    return street;
  }

  public Long getVersion() {
    return version;
  }

  @Override
  public int hashCode() {
    int hash = ObjectUtils.nullSafeHashCode(getId());
    return hash;
  }

  public void setAlias(String alias) {
    this.alias = alias;
  }

  public void setCity(CityVO city) {
    this.city = city;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public void setFax(String fax) {
    this.fax = fax;
  }

  public void setFirstname(String firstname) {
    this.firstname = firstname;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public void setLastname(String lastname) {
    this.lastname = lastname;
  }

  public void setMobile(String mobile) {
    this.mobile = mobile;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }

  public void setPostalCode(String postalCode) {
    this.postalCode = postalCode;
  }

  public void setRegion(RegionVO region) {
    this.region = region;
  }

  public void setStreet(String street) {
    this.street = street;
  }

  public void setVersion(Long version) {
    this.version = version;
  }
}
